package com.video.chat;

import com.video.chat.websocket.WebSocketServer;
import org.apache.catalina.core.ApplicationContext;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("com.video.chat.mapper")
@EnableFeignClients(basePackages="com.video.api.client")
@ComponentScan(basePackages = {"com.video.chat", "com.video.chat.websocket"})
public class ChatApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ChatApplication.class, args);
        WebSocketServer.setApplicationContext(context);
    }
}



